Repository navigation
feat: resize panes from the keyboard with pane.resize - #1087
Open
darkwebber wants to merge 1 commit into
Open
darkwebber wants to merge 1 commit into
darkwebber wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits can only be resized by dragging the divider. Keyboard resize (tmux's
resize-pane, the herdr TUI's resize mode) can't be built as a mod, because no command changes a split's sizes.What it does
pane.resize {direction, pane?, px?}moves the border nearest the pane along that axis bypx(default 40). It sets up the sameDragthe divider uses and callsdrag_to, so min/max, px and weight children, zoom and saving behave exactly like a mouse drag.defaults/AGENTS.md,herdr.d.tsanddocs/commands.md.Before growing the core
Testing
cargo test --lockedpasses;bun scripts/docs.ts generateleaves no changes.window::tests::panes_resize_from_the_keyboardcovers direction validation, the no-op and an unknown pane. Moving a real divider needs laid-out bounds, so I checked that by hand on macOS: a 120px move left then 200px right moved the divider 240 and 400 device px.🤖 Generated with Claude Code